<!doctype html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, maximum-scale = 1, minimum-scale=1" />
		<meta name="apple-mobile-web-app-capable" content="yes" />
		<meta name="viewport" content="width=640,user-scalable=0">
		<title>车栈-新闻详情</title>

		<link href="css/style.css" rel="stylesheet" type="text/css" />
		<script src="js/jquery-1.8.2.min.js"></script>
		<script src="js/mui.min.js"></script>
		<script src="js/app.js"></script>
	</head>

	<body>
		<section class="section">
			<div class="top-gray">
				<a class="back mui-action-back"><img src="images/back-gray.png"></a>
				<a class="pro_t">新闻详情</a>
				<a class="share" href="javascript:void(0)" onclick="document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'"><img src="images/share.png"></a>
			</div>
			<div id="light" class="white_content">
				<a href="javascript:void(0)" onclick="document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'"><img src="images/close.png"></a>
				<ul>
					<li><img src="images/weixin.png"><span>微信好友</span></li>
					<li><img src="images/pengyq.png"><span>朋友圈</span></li>
					<li><img src="images/qq.png"><span>QQ好友</span></li>
					<li><img src="images/qone.png"><span>QQ空间</span></li>
				</ul>
			</div>
			<div id="fade" class="black_overlay"></div>
			<div class="clear"></div>
			<div class="pos-top">
				<div class="news">
					<h1 id="title"></h1>
					<h2>车栈  日期：<span id="date"></span>  浏览次数：<span id="click"></span></h2>
					<div id="content"></div>
				</div>
			</div>
			<!--底部导航-->
			<div style="height:120px;"></div>
		</section>
		<script>
			console.log(web_url);
			var httpurl = web_url;
			mui.init({

			});
			mui.plusReady(function() {
				var self = plus.webview.currentWebview();
				var news_id = self.data_id;
				this_news_id = news_id;
			
				getNewsInfo(news_id);

			})

			//获取新闻信息
			function getNewsInfo(id) {
				var postData = {
					apiUrl: httpurl + 'page_news/newsintro.shtml',
					datas: {
						id: id
					}
				};
				app.postServer(postData,
					function(results) {

						if(results) {
							var result = results.news;
							$("#title").html(result.name);
							$("#content").html(result.content);
							$("#date").html(result.date);
							$("#click").html(result.click);

							return;
						}
					},

					function(err) {
						if(err) {
							plus.nativeUI.toast(err);

							return;
						}

					}

				);

			}
		</script>

	</body>

</html>